package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.RegistrationRecordAddDTO;
import org.jsola.hr.dto.RegistrationRecordUpdateDTO;
import org.jsola.hr.query.RegistrationRecordQuery;
import org.jsola.hr.vo.RegistrationRecordListVO;
import org.jsola.hr.vo.RegistrationRecordVO;

import java.util.List;

/**
 * 登录记录
 *
 * @author zhr
 */
@Api(tags = "hr-登录记录")
public interface IRegistrationRecordControllerAPI {

    /**
     * 新增登录记录
     *
     * @param registrationRecordAddDTO 登录记录新增实体
     * @return 登录记录展示对象
     */
    @ApiOperation(value = "新增登录记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "registrationRecordAddDTO", dataType = "RegistrationRecordAddDTO", value = "新增登录记录", paramType = "body")
    })
    Result<RegistrationRecordVO> save(RegistrationRecordAddDTO registrationRecordAddDTO);


    /**
     * 修改登录记录
     *
     * @param registrationRecordUpdateDTO 登录记录
     * @return 更新数量
     */
    @ApiOperation(value = "修改登录记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "registrationRecordUpdateDTO", dataType = "RegistrationRecordUpdateDTO", value = "修改登录记录", paramType = "body")
    })
    Result<Integer> update(RegistrationRecordUpdateDTO registrationRecordUpdateDTO);


    /**
     * 删除单个登录记录，彻底删除
     *
     * @param registrationRecordId 登录记录id
     * @return 删除数量
     */
    @ApiOperation(value = "删除单个登录记录，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "registrationRecordId", dataType = "String", value = "登录记录id", paramType = "path")
    })
    Result<Integer> delete(String registrationRecordId);


    /**
     * 批量删除登录记录，彻底删除
     *
     * @param registrationRecordIds 登录记录id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除登录记录，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "registrationRecordIds", dataType = "String[]", value = "登录记录id数组", paramType = "body", allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] registrationRecordIds);


    /**
     * 根据登录记录id查询登录记录详情
     *
     * @param registrationRecordId 登录记录id
     * @return 登录记录详情
     */
    @ApiOperation(value = "根据登录记录id查询登录记录详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "registrationRecordId", dataType = "String", value = "登录记录id", paramType = "path")
    })
    Result<RegistrationRecordVO> findById(String registrationRecordId);


    /**
     * 查询登录记录
     *
     * @param registrationRecordQuery 登录记录查询参数
     * @return page
     */
    @ApiOperation(value = "查询登录记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "registrationRecordQuery", dataType = "RegistrationRecordQuery", value = "登录记录查询参数", paramType = "query")
    })
    Result<List<RegistrationRecordListVO>> listAll(RegistrationRecordQuery registrationRecordQuery);


    /**
     * 分页查询登录记录
     *
     * @param registrationRecordQuery 登录记录查询参数
     * @return page
     */
    @ApiOperation(value = "分页查询登录记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "registrationRecordQuery", dataType = "RegistrationRecordQuery", value = "登录记录查询参数", paramType = "query")
    })
    Result<Page<RegistrationRecordListVO>> page(RegistrationRecordQuery registrationRecordQuery);

    /**
     * 查询渠道小程序员工最后登录的公司
     */
    @ApiOperation(value = "查询渠道小程序员工最后登录的公司")
    Result<RegistrationRecordVO> selectByUserId();

}

